﻿Option Strict Off
Imports System.Net.Mail

Public Class HistoryForTabs

    Private Sub History_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        For Each BrowserHistory As String In My.Settings.BrowserHistory
            ListBox1.Items.Add(BrowserHistory)
        Next
    End Sub

    Private Sub DeleteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteToolStripMenuItem.Click
        My.Settings.BrowserHistory.Remove(ListBox1.SelectedItem)
        ListBox1.Items.Clear()
        For Each BrowserHistory As String In My.Settings.BrowserHistory
            ListBox1.Items.Add(BrowserHistory)
        Next
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        My.Settings.BrowserHistory.Remove(ListBox1.SelectedItem)
        ListBox1.Items.Clear()
        For Each BrowserHistory As String In My.Settings.BrowserHistory
            ListBox1.Items.Add(BrowserHistory)
        Next
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        My.Settings.BrowserHistory.Clear()
        ListBox1.Items.Clear()
        My.Settings.BrowserHistory.Add(My.Settings.CurrentUrlForTabs)
        For Each BrowserHistory As String In My.Settings.BrowserHistory
            ListBox1.Items.Add(BrowserHistory)
        Next
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.Close()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        BrowserWithoutTabs.HistoryForTabsNavigate()
        Me.Close()
    End Sub

    Private Sub HistoryForTabs_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        ListBox1.Items.Clear()
    End Sub
End Class